//
//  JProductDetailController.m
//  HeadIndustry
//
//  Created by jun on 2017/8/28.
//  Copyright © 2017年 jun. All rights reserved.
//

#import "JProductDetailController.h"
#import "JProductDetailHeadView.h" // 轮播View
#import "JAllScreenCycleView.h" // 全屏的轮播View
#import "JHeadImgModel.h" // 轮播 model
#import "JShopCarBtn.h" // 购物车按钮View
#import "JButtomView.h" // 底部按钮View
#import "JProductTextView.h" // 文本信息View
#import "JProductCommentView.h" // 评论View
#import "JProductPromiseView.h" // 正品保证，7天退货
#import "JFirstView.h" // imgView
#import "JProductDetailTableCell.h" // 产品参数View
#import "JThirdTableCell.h" // 售后说明View
#import "JLastView.h" // 进入店铺 View
#import "JLikeView.h" // 猜你喜欢 View

#import "AddToShopCarView.h" // 添加购物车View

#import "JProductAllCommentController.h" // 全部评论

#import "JVerdorController.h" // 店铺
#import "JMsgController.h"
#define BetweenViewHeight 15

@interface JProductDetailController ()

@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) JButtomView *buttomView;
@property (nonatomic, copy) NSArray *commentDataArr; // 商品评论 数据数组
@property (nonatomic, copy) NSArray *tableImgArr; // 商品介绍
@property (nonatomic, strong) NSMutableArray *headImgArr; // 头部循环图片数组

@property (nonatomic, strong) JProductDetailHeadView *headView; // 轮播图 View
@property (nonatomic, strong) JAllScreenCycleView *allScreenView; // 全屏轮播图 View

@property (nonatomic, strong) JProductTextView *textView;    // 商品名字 View
@property (nonatomic, strong) JProductCommentView *commentView; // 评论 View
@property (nonatomic, strong) JProductPromiseView *promiseView; // 保证 View

@property (nonatomic, strong) UIView *threeBtnView;  // 商品介绍，产品参数 View

@property (nonatomic, strong) JFirstView *firstView;  // 商品介绍图 View
@property (nonatomic, strong) JProductDetailTableCell *secondView; // 产品参数 View
@property (nonatomic, strong) JThirdTableCell *thirdView; // 售后说明 View
@property (nonatomic, strong) JLastView *lastView; // 店铺信息 View
@property (nonatomic, strong) JLikeView *youlikeView; // 猜你喜欢 View

@property (nonatomic, strong) JShopCarBtn *shopCarBtn; // 购物车按钮

@property (nonatomic, strong) AddToShopCarView  *addShopView;

@property (nonatomic, strong) JReuqestProductDetailModel *requestProductModel; // 请求评论参数 model
@property (nonatomic, strong) JCurrentProductModel *currentProduct; // 请求商品详情参数 model
@property (nonatomic, strong) JYouLikeModel *youLikeModel;  // 猜你喜欢参数 model
@property (nonatomic , assign) BOOL isBuy;

@end

@implementation JProductDetailController

- (NSArray *)commentDataArr
{
    if (!_commentDataArr) {
        _commentDataArr = [NSArray array];
    }
    return _commentDataArr;
}

- (JYouLikeModel *)youLikeModel
{
    if (!_youLikeModel) {
        _youLikeModel = [JYouLikeModel new];
        _youLikeModel.Ids = [NSString stringWithFormat:@"%ld",(long)_productModel.Id];
        _youLikeModel.pageIndex = 1;
        _youLikeModel.pageSize = 10;

    }
    return _youLikeModel;
}

- (JReuqestProductDetailModel *)requestProductModel
{
    if (!_requestProductModel) {
        _requestProductModel = [JReuqestProductDetailModel new];
        _requestProductModel.ProductId = _productModel.Id;
        _requestProductModel.pageIndex = 1;
        _requestProductModel.pageSize = 1;
        _requestProductModel.Rating = 0; // 固定值
    }
    return _requestProductModel;
}

- (UIView *)threeBtnView
{
    if (!_threeBtnView) {
        _threeBtnView = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_promiseView.frame) + BetweenViewHeight, kWindowW, 45)];
        _threeBtnView.backgroundColor = [UIColor whiteColor];
        CGFloat btnWidth = kWindowW /3.0;
        NSArray *nameArr = @[@"商品介绍",@"产品参数",@"猜你喜欢"];
        for (int i = 0; i < 3; i ++) {
            UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(i*btnWidth, 0, btnWidth, 45)];
            [btn setTitle:nameArr[i] forState:UIControlStateNormal];
            [btn setTitleColor:kRGBColor(151, 151, 151) forState:UIControlStateNormal];
            if (i == 0) {
                [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
            }
            btn.tag = 20 + i;
            btn.titleLabel.font = kFONT_TITLE(16);
            [btn addTarget:self action:@selector(threebtnClick:) forControlEvents:UIControlEventTouchUpInside];
            [_threeBtnView addSubview:btn];
        }
        
        [self.scrollView addSubview:_threeBtnView];
        
        CALayer *line = [CALayer layer];
        line.backgroundColor = kRGBColor(157, 157, 157).CGColor;
        line.frame = CGRectMake(10, _threeBtnView.height-0.5, kWindowW - 20, 0.5);
        [_threeBtnView.layer addSublayer:line];
    }
    return _threeBtnView;
}

- (NSArray *)tableImgArr
{
    if (!_tableImgArr) {
        _tableImgArr = [NSArray array];
    }
    return _tableImgArr;
}

- (JCurrentProductModel *)currentProduct
{
    if (!_currentProduct) {
        _currentProduct = [JCurrentProductModel new];
        _currentProduct.ProductId = _productModel.Id;
        _currentProduct.CustomerId = [GLOBALDATA userInfoModel].CustomerId;
    }
    return _currentProduct;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.automaticallyAdjustsScrollViewInsets = NO;

    _headImgArr = [NSMutableArray array];
    
    [self setUpSelfView]; // 配置self.view
    
    [self addHeadView]; // 配置scrollView
    
    [self setUpView]; // 返回按钮
    
}

- (void)setUpSelfView
{
    _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, kWindowW, kWindowH - 49)];
    _scrollView.backgroundColor = kRGBColor(245, 245, 245);
    _scrollView.showsVerticalScrollIndicator = NO;
    [self.view addSubview:_scrollView];
    
//    UISwipeGestureRecognizer *swipeGestrue = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeGestrue:)];
//    [self.view addGestureRecognizer:swipeGestrue];
    
    _shopCarBtn = [[JShopCarBtn alloc]initWithFrame:CGRectMake(kWindowW - 60 - 15, kWindowH / 2.0, 60, 60)];
    [_shopCarBtn addTarget:self action:@selector(shopCarBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_shopCarBtn];
    
    JButtomView *buttomView = [[JButtomView alloc] initWithFrame:CGRectMake(0, kWindowH - 49, kWindowW, 49)];
    [self.view addSubview:buttomView];
    _buttomView = buttomView;
}

- (void)setUpView
{
    UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [backBtn setImage:[UIImage imageNamed:backBtnImg] forState:UIControlStateNormal];
    backBtn.left = 20;
    backBtn.top = 35;
    backBtn.size = CGSizeMake(30,35);
//    backBtn.backgroundColor = [UIColor grayColor];
    [backBtn addTarget:self action:@selector(backBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.scrollView addSubview:backBtn];
}

- (void)addHeadView
{
    _headView = [[JProductDetailHeadView alloc]initWithFrame:CGRectMake(0, 20, kWindowW, 230) imgBanners:_headImgArr];
    [self.scrollView addSubview:_headView];
    
    
    _textView = [[JProductTextView alloc] initWithFrame:CGRectMake(0, _headView.height + BetweenViewHeight, kWindowW, 170)];
    [self.scrollView addSubview:_textView];
    
    _commentView = [[JProductCommentView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_textView.frame) + BetweenViewHeight, kWindowW, 80)];
    
    
    [self.scrollView addSubview:_commentView];
    
    _promiseView = [[JProductPromiseView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_commentView.frame) + BetweenViewHeight, kWindowW, 40)];
    [self.scrollView addSubview:_promiseView];
    
    _firstView = [[JFirstView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.threeBtnView.frame), kWindowW, self.tableImgArr.count * 445)];
    [self.scrollView addSubview:_firstView];
    
    _secondView = [[JProductDetailTableCell alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_firstView.frame) + BetweenViewHeight, kWindowW, 160)];
    [self.scrollView addSubview:_secondView];

    _thirdView = [[JThirdTableCell alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_secondView.frame) + BetweenViewHeight, kWindowW, 250)];
    [self.scrollView addSubview:_thirdView];
    
    _lastView = [[JLastView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_thirdView.frame) + BetweenViewHeight, kWindowW, 200)];
    
    [self.scrollView addSubview:_lastView];
    
    _youlikeView = [[JLikeView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_lastView.frame) + BetweenViewHeight, kWindowW, 445 + 40) isHeadView:YES];
    _youlikeView.isHeadView = YES;
    [self.scrollView addSubview:_youlikeView];
    
    
    UIWindow *window = [[[UIApplication sharedApplication]delegate]window];
    
    _addShopView = [[AddToShopCarView alloc] initWithFrame:CGRectMake(0, 0, kWindowW, kWindowH)];
    [window addSubview:_addShopView];
    _addShopView.hidden = YES;
    
    
    _allScreenView = [[JAllScreenCycleView alloc] initWithFrame:CGRectMake(0, 0, kWindowW, kWindowH) imgBanners:_headImgArr];
    [window addSubview:_allScreenView];
    _allScreenView.hidden = YES;
    
    // 所有block 方法
    [self allBlockMethod];
}

/// 加载商品评论信息
- (void)LoadProductCommentData
{
    NSString *url = @"Products/GetProductComments";
    
    [JNetManager LoadProductCommentUrl:url
                        productIDModel:self.requestProductModel
                               success:^(id response) {
                                   if (response) {
                                       self.commentDataArr = (NSArray *)response;
                                       _commentView.dataArr = self.commentDataArr;
                                       
                                       [self configViewRect];
                                   }
                               }
                               failure:^(NSString *err) {
                                   
                                   _commentView.dataArr = @[];
                                   [self configViewRect];
                                   [SVProgressHUD showErrorWithStatus:@"评论信息加载失败"];
                               }];

    
}

/// 加入收藏
- (void)addToCollectRequest
{
    NSString *url = @"Products/CollectProduct";
    //    Products/AssociatedProductList
    [JNetManager AddCommentToCollectUrl:url
                         productIDModel:self.currentProduct
                                success:^(id response) {
                                    if (response) {
                                        
                                        if ([response integerValue] == 1) {
                                            
                                            [self LoadViewProductDetail];
                                            
                                        }
                                        
                                    }
                                } failure:^(NSString *err) {
                                    [SVProgressHUD showErrorWithStatus:@"加入收藏失败"];

                                }];
}

/// 加载猜你喜欢信息
- (void)LoadYouLikeRequest
{
    NSString *url = @"Products/AssociatedProductList";
//    Products/AssociatedProductList
    [JNetManager LoadYouLikeCommentUrl:url
                        productIDModel:self.youLikeModel
                               success:^(id response) {
                                   if (response) {
                                       NSArray *arr = response;
                                       if (arr.count > 0) {
                                           _youlikeView.dataArr = arr;
                                           
                                       }
                                       
                                       [self configViewRect];
                                       
                                   }
                               }
                               failure:^(NSString *err) {
                                   
                                   _youlikeView.dataArr = @[];
                                   [self configViewRect];
                                   
                                   [SVProgressHUD showErrorWithStatus:@"猜你喜欢加载失败"];
                               }
     ];
}

/// 加入购物车 获取产品属性
- (void)LoadProductAttributeRequest
{
    NSString *url = @"Products/GetAttributeAndValues";
    //    Products/AssociatedProductList
    [JNetManager GetProductAttributeUrl:url
                        productIDModel:self.currentProduct
                               success:^(id response) {
                                   if (response) {
                                       NSArray *arr = response;
                                       if (arr.count > 0) {
                                           _addShopView.dataArr = arr;
                                           
                                       }
                                   }
                               }
                               failure:^(NSString *err) {
                                   
                                   [SVProgressHUD showErrorWithStatus:@"获取产品属性失败"];
                               }
     ];
}

/// 加入购物车 或者 购买商品
- (void)AddProductToShopCarRequest:(JAddToShopCarRequestModel *)shopModel
{
    NSString *url = @"ShoppingCartItems/CreateShoppingCartItem";

    [JNetManager GetProductAttributeUrl:url
                        buyProductModel:shopModel
                                success:^(id response) {
                                    if (response) {
                                        // 显示购物车内的数量
                                        _shopCarBtn.numStr = [NSString stringWithFormat:@"%ld",(long)_productModel.ProductCountInCar + shopModel.Qty];
                                        
                                        if (_isBuy) {
                                            // 调购买接口
                                        }
                                        
                                    }
                                }
                                failure:^(NSString *err) {
                                    [SVProgressHUD showErrorWithStatus:@"加入购物车 或者 购买失败"];
                                }];
}

/// 加载商品详情数据
- (void)LoadViewProductDetail
{
    NSString *url = @"Products/GetProductById";
    [SVProgressHUD show];
    [_headImgArr removeAllObjects];
    
    [JNetManager LoadProductDetailUrl:url
                            pageModel:self.currentProduct
                              success:^(id response) {
                                  if (response) {
                                      _productModel = response;
                                      NSArray *arr = _productModel.Banners;
                                      
                                      dispatch_async(dispatch_get_global_queue(0, 0), ^{
                                          for (int i = 0; i < arr.count; i++) {
                                              JHeadImgModel *model = [JHeadImgModel new];
                                              [model setValuesForKeysWithDictionary:arr[i]];
                                              [_headImgArr addObject:model];
                                          }
                                          
                                          // 设置商品文字信息的 赋值
                                          _textView.productMedol = _productModel;
                                          
                                          // 设置商品介绍的数据源
                                          self.tableImgArr = _productModel.DescriptionImgs;
                                          
                                          dispatch_async(dispatch_get_main_queue(), ^{
                                              [SVProgressHUD dismiss];
                                              // 配置轮播图
                                              _headView.bennersArr = [NSArray arrayWithArray:_headImgArr];
                                              
                                              
                                              // 是否收藏
                                              [self configCollectBtnStatue:_productModel.IsCollect];
                                              
                                              // 商品介绍
                                              _firstView.imgHeight = 445;
                                              _firstView.imgDataArr = self.tableImgArr;
                                              
//                                              // 显示购物车内的数量
                                              _shopCarBtn.numStr = [NSString stringWithFormat:@"%ld",(long)_productModel.ProductCountInCar];
                                              
                                              // 产品参数赋值
                                              _secondView.heightView = 60;
                                              _secondView.dataArr = _productModel.ProductSpecificationAttributes;

                                              // 售后说明赋值
                                              _thirdView.contentStr = _productModel.OtherHelp;
                                              
                                              // 店铺信息
                                              _lastView.productModel = _productModel;
                                              
                                              // 添加购物车按钮 视图配置
                                              _addShopView.productModel = _productModel;
                                              
                                              // 添加购物车信息
                                              [GLOBALDATA toShopCarModel].CustomerEnteredPrice = _productModel.Price;
                                              [GLOBALDATA toShopCarModel].ProductId = _productModel.Id;
                                              
                                              
                                              [self configViewRect];
                                              
                                              
                                          });
                                          
                                      });
                                      
                                  }
                              }
                              failure:^(NSString *err) {
                                  [SVProgressHUD dismiss];

                                  [self configViewRect];
                                  [SVProgressHUD showErrorWithStatus:@"商品详情数据加载失败"];
                              }];
}

///// 滑动手势 退出
//- (void)swipeGestrue:(UISwipeGestureRecognizer *)gestrue
//{
//    //判断是左或者右
//    switch (gestrue.direction){
//        case UISwipeGestureRecognizerDirectionRight:
//            
//            [self.navigationController popViewControllerAnimated:YES];
//            
//            break;
//       
//        default:
//            break;
//    }
//}

/// 跳转产品参数和猜你喜欢
- (void)threebtnClick:(UIButton *)btn
{
    switch (btn.tag) {
        case 20:
//            NSLog(@"商品介绍btn");
            break;
        case 21:
        {
            [_scrollView setContentOffset:CGPointMake(0, _secondView.centerY - 64 - 40) animated:YES];
        }
            break;
        case 22:
        {
            if (_youlikeView.dataArr.count > 0)
            {
                [_scrollView setContentOffset:CGPointMake(0, _lastView.centerY -  _lastView.height + 20 ) animated:YES];
            }
            else
            {
                [_scrollView setContentOffset:CGPointMake(0, 0) animated:YES];
            }
        }
            break;
            
        default:
            break;
    }
}

/// 动态改变View 高度
- (void)configViewRect
{
    
    _commentView.frame = CGRectMake(0, CGRectGetMaxY(_textView.frame) + BetweenViewHeight, kWindowW, [_commentView getViewHeight]);
    
    _promiseView.frame = CGRectMake(0, CGRectGetMaxY(_commentView.frame) + BetweenViewHeight, kWindowW, 40);
    
    self.threeBtnView.frame = CGRectMake(0, CGRectGetMaxY(_promiseView.frame) + BetweenViewHeight, kWindowW, 45);
    
    _firstView.frame = CGRectMake(0, CGRectGetMaxY(self.threeBtnView.frame), kWindowW, self.tableImgArr.count * 445 + 30);
    
    _secondView.frame = CGRectMake(0, CGRectGetMaxY(_firstView.frame) + BetweenViewHeight, kWindowW, 40 + _productModel.ProductSpecificationAttributes.count * 60);
    
    _thirdView.frame = CGRectMake(0, CGRectGetMaxY(_secondView.frame) + BetweenViewHeight, kWindowW, [_thirdView thirdViewHeight]);
    
    _lastView.frame = CGRectMake(0, CGRectGetMaxY(_thirdView.frame) + BetweenViewHeight, kWindowW, 200);
    
    _youlikeView.frame = CGRectMake(0, CGRectGetMaxY(_lastView.frame) + BetweenViewHeight, kWindowW, [_youlikeView getViewHeight]);
    
    if (_youlikeView.height == 0) {
        _youlikeView.hidden = YES;
    }
    else
    {
        _youlikeView.hidden = NO;
    }
    
    _scrollView.contentSize = CGSizeMake(kWindowW, (CGRectGetHeight(_headView.frame) + CGRectGetHeight(_textView.frame) + CGRectGetHeight(_commentView.frame) + CGRectGetHeight(_promiseView.frame) + CGRectGetHeight(_firstView.frame) + CGRectGetHeight(_secondView.frame) + CGRectGetHeight(_thirdView.frame) + CGRectGetHeight(_lastView.frame) + [_youlikeView getViewHeight] +BetweenViewHeight * 10) + 30);
    
}

/// 加载数据
- (void)setProductModel:(JProductDetailModel *)productModel
{
    _productModel = productModel;
    
    [self LoadProductCommentData]; // 加载评论
    
    [self LoadYouLikeRequest]; // 猜你喜欢
    
    [self LoadViewProductDetail]; // 加载商品详情
    
    [self LoadProductAttributeRequest]; // 加入购物车 获取产品属性
}

/// 所有block 方法
- (void)allBlockMethod
{
    
    __weak typeof(self) weakSelf = self;
    
    _buttomView.btnType = ^(JButtonType type){
        
        switch (type) {
            case JButtonTypeMsg:
                
            {
                NSLog(@"消息");
                JMsgController *msgVC = [[JMsgController alloc]init];
//                msgVC.hidesBottomBarWhenPushed = YES;
                [weakSelf.navigationController pushViewController:msgVC animated:YES];
            }
                break;
            case JButtonTypeStore:
//                NSLog(@"店铺");
            {
                JVerdorController *verdorVC = [[JVerdorController alloc]init];
                verdorVC.verdorID = weakSelf.productModel.VendorId;
                [weakSelf.navigationController pushViewController:verdorVC animated:YES];
            }
                break;
            case JButtonTypeCollect:
                
                // 加入收藏
                [weakSelf addToCollectRequest];
                break;
            case JButtonTypeShopCar:
                
                weakSelf.isBuy = NO;
                // 加入购物车
                weakSelf.addShopView.hidden = NO;
                
                [GLOBALDATA toShopCarModel].IsBuy = 0;
                
                
                break;
            case JButtonTypeBuy:
                
//                NSLog(@"立即购买");
                weakSelf.isBuy = YES;
                // 立即购买
                weakSelf.addShopView.hidden = NO;
                
                [GLOBALDATA toShopCarModel].IsBuy = 1;
                
                break;
                
            default:
                break;
        }
    };
    
    // 加载全部评论
    _commentView.AllCommentBlock = ^{
        JProductAllCommentController *allCommentVC = [JProductAllCommentController new];
        allCommentVC.proId = weakSelf.productModel.Id;
        [weakSelf.navigationController pushViewController:allCommentVC animated:YES];
    };
    
    _lastView.inputStore = ^{
//        NSLog(@"进入店铺");
        JVerdorController *verdorVC = [[JVerdorController alloc]init];
        verdorVC.verdorID = weakSelf.productModel.VendorId;
        [weakSelf.navigationController pushViewController:verdorVC animated:YES];
    };
    
    _headView.doneGsture = ^{
        weakSelf.allScreenView.isClass = YES;
        // 配置全屏的轮播图
        weakSelf.allScreenView.bennersArr = [NSArray arrayWithArray:weakSelf.headImgArr];
        weakSelf.allScreenView.hidden = NO;
    };
    
    _allScreenView.cencleGesture = ^{
        weakSelf.allScreenView.hidden = YES;
    };
    
    
    _youlikeView.cellSelectBlock = ^(JProductDetailModel *selModel) {
        JProductDetailController *detail = [[JProductDetailController alloc]init];
        detail.productModel = selModel;
        detail.hidesBottomBarWhenPushed = YES;
        [weakSelf.navigationController pushViewController:detail animated:YES];
    };
    
    _addShopView.bigImgBlock = ^(NSArray *imgArr) {
        weakSelf.allScreenView.isClass = NO;
        // 配置全屏的轮播图
        weakSelf.allScreenView.bennersArr = [NSArray arrayWithArray:imgArr];
        weakSelf.allScreenView.hidden = NO;
    };
    
    
    _addShopView.cancleBtnBlock = ^{
        [SVProgressHUD dismiss];
        weakSelf.addShopView.hidden = YES;
    };
    
    _addShopView.addRequestBtnBlock = ^(JAddToShopCarRequestModel *shopModel){
        
        shopModel.IsBuy = weakSelf.isBuy;
        [weakSelf AddProductToShopCarRequest:shopModel];
        
        weakSelf.addShopView.hidden = YES;
    };
    
}

- (void)configCollectBtnStatue:(BOOL)isCollect;
{
    UIButton *btn = _buttomView.btnArr[2];
    if (isCollect)
    {
        [btn setImage:[UIImage imageNamed:@"collectSelecetd"] forState:UIControlStateNormal];
        [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    }
    else
    {
        [btn setImage:[UIImage imageNamed:@"fotstar"] forState:UIControlStateNormal];
        [btn setTitleColor:kRGBColor(149, 149, 149) forState:UIControlStateNormal];
    }
    
}

- (void)shopCarBtnClick:(JShopCarBtn *)btn
{
    if (_inputType == 2) {
        [self.navigationController popViewControllerAnimated:YES];
    }
    // 前往购物车
    JGoShopCarViewController
}

// 返回按钮
- (void)backBtnClick:(UIButton *)backbtn{
    [self.navigationController popViewControllerAnimated:YES];
}


@end
